package org.eclipse.soc.ide4edu.assignment.editors;

import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.forms.editor.FormEditor;

public class AssignmentEditor extends FormEditor {

	@Override
	protected void addPages() {
		try {
			addPage(new OpenPage(this));
		} catch (PartInitException e) {
			e.printStackTrace();
		}

	}

	@Override
	public void doSave(IProgressMonitor monitor) {

	}

	@Override
	public void doSaveAs() {

	}

	public IProject getAssignment() {
		return ((IFileEditorInput) getEditorInput()).getFile().getProject();
	}

	@Override
	public boolean isSaveAsAllowed() {

		return false;
	}

}
